package com.yulinlin.admin.modules.im.service.impl;

import com.yulinlin.admin.modules.im.domain.ImSessionUserEntity;
import com.yulinlin.admin.modules.im.service.IImSessionUserService;
import com.yulinlin.admin.modules.im.dao.ImSessionUserDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.yulinlin.common.service.impl.ServiceImpl;

@Service

public class ImSessionUserServiceImpl extends ServiceImpl<ImSessionUserEntity> implements IImSessionUserService  {


    @Autowired
    private ImSessionUserDao dao;

    //添加会话id和用户id
    public int sessionUser(String sessId, String userId, String role, String name){
        ImSessionUserEntity userEntity = new ImSessionUserEntity();
        userEntity.setImSessionId(sessId);
        userEntity.setUserId(userId);
        userEntity.setNickname(name);

        return dao.insertOne(userEntity);
    }

}
